package com.sogou.qadev.service.login.client.query;

public class QueryProxy implements com.sogou.qadev.service.login.client.query.Query {
  private String _endpoint = null;
  private com.sogou.qadev.service.login.client.query.Query query = null;
  
  public QueryProxy() {
    _initQueryProxy();
  }
  
  private void _initQueryProxy() {
    try {
      query = (new com.sogou.qadev.service.login.client.query.QueryServiceLocator()).getQuery();
      if (query != null) {
        if (_endpoint != null)
          ((javax.xml.rpc.Stub)query)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
        else
          _endpoint = (String)((javax.xml.rpc.Stub)query)._getProperty("javax.xml.rpc.service.endpoint.address");
      }
      
    }
    catch (javax.xml.rpc.ServiceException serviceException) {}
  }
  
  public String getEndpoint() {
    return _endpoint;
  }
  
  public void setEndpoint(String endpoint) {
    _endpoint = endpoint;
    if (query != null)
      ((javax.xml.rpc.Stub)query)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
    
  }
  
  public com.sogou.qadev.service.login.client.query.Query getQuery() {
    if (query == null)
      _initQueryProxy();
    return query;
  }
  
  public com.sogou.qadev.service.login.bean.Group[] queryGroups(long keyId, int lines, int pageNumber) throws java.rmi.RemoteException{
    if (query == null)
      _initQueryProxy();
    return query.queryGroups(keyId, lines, pageNumber);
  }
  
  public com.sogou.qadev.service.login.bean.Data[] queryAllowedDatas(long keyId, long productId, int lines, int pageNumber) throws java.rmi.RemoteException{
    if (query == null)
      _initQueryProxy();
    return query.queryAllowedDatas(keyId, productId, lines, pageNumber);
  }
  
  public com.sogou.qadev.service.login.bean.Event[] queryAllowedEvents(long keyId, long productId, int lines, int pageNumber) throws java.rmi.RemoteException{
    if (query == null)
      _initQueryProxy();
    return query.queryAllowedEvents(keyId, productId, lines, pageNumber);
  }
  
  public com.sogou.qadev.service.login.bean.User[] queryUsers(long keyId, int lines, int pageNumber) throws java.rmi.RemoteException{
    if (query == null)
      _initQueryProxy();
    return query.queryUsers(keyId, lines, pageNumber);
  }
  
  public com.sogou.qadev.service.login.bean.User[] queryGroupUsers(long keyId, java.lang.String groupName, int lines, int pageNumber) throws java.rmi.RemoteException{
    if (query == null)
      _initQueryProxy();
    return query.queryGroupUsers(keyId, groupName, lines, pageNumber);
  }
  
  public com.sogou.qadev.service.login.bean.Group[] queryUserGroups(long keyId, java.lang.String username, int lines, int pageNumber) throws java.rmi.RemoteException{
    if (query == null)
      _initQueryProxy();
    return query.queryUserGroups(keyId, username, lines, pageNumber);
  }
  
  public java.lang.String queryUserXml(long keyId, java.lang.String username) throws java.rmi.RemoteException{
    if (query == null)
      _initQueryProxy();
    return query.queryUserXml(keyId, username);
  }
  
  public java.lang.String queryGroupXml(long keyId, java.lang.String groupname) throws java.rmi.RemoteException{
    if (query == null)
      _initQueryProxy();
    return query.queryGroupXml(keyId, groupname);
  }
  
  
}